﻿@model KPIS.GERP.Models.SYS.User

@{ViewBag.Title = "ประวัติส่วนตัวของ" + Html.DisplayFor(m => m.Employee.FullName);}

@if (Model.Employee == null)
{
    @:No Employee Data
} else {
    <center><img height="400px" src="@Url.Action("ImagesByName", "File", new { imageName = Model.Employee.ImageUnique })"
             class="nav-user-photo" alt="รูปของ @Html.DisplayFor(m => m.Employee.FullName)" /></center> 
    
    <div class="alert-info" style="font-family: tahoma; font-size:14px; margin-top: 10px; padding: 10px 10px 10px 10px; 
                                      border: solid 1px rgb(0, 153, 146);-webkit-border-radius: 5px;-moz-border-radius: 5px;
border-radius: 5px;"> 
         
        <span style="font-size: 14px">@Model.Employee.FullName </span><br/>
        @Html.DisplayNameFor(m => m.Employee.Position.Name)  : @(Model.Employee.Position != null ? Model.Employee.Position.Name : "-")<br/>
        @Html.DisplayNameFor(m => m.Employee.MasReligion.Name)  : @(Model.Employee.MasReligion != null ? Model.Employee.MasReligion.Name : "-")<br/>
        @Html.DisplayNameFor(m => m.Employee.MasEmployeeType.Name)  : @(Model.Employee.MasEmployeeType != null ? Model.Employee.MasEmployeeType.Name : "-")<br/>
        ระดับ : @(Model.Employee.MasClass != null ? Model.Employee.MasClass.ClassName : "")<br/>
        @Html.DisplayNameFor(m => m.Employee.Citizen) : @Model.Employee.Citizen<br/>
        @Html.DisplayNameFor(m => m.Employee.WorkingJobSiteId) : @(Model.Employee.JobSite != null ? Model.Employee.JobSite.Name : "-")<br/>
        @Html.DisplayNameFor(m => m.Employee.ExecutivePosition.Name)  : @(Model.Employee.ExecutivePosition != null ? Model.Employee.ExecutivePosition.Name : "-")<br/>
        @Html.DisplayNameFor(m => m.Employee.AdmittedDate)  : @(Model.Employee.AdmittedDate == null ?"" : Model.Employee.AdmittedDate.Value.ToString("dd MMMM yyyy"))<br/>
        @Html.DisplayNameFor(m => m.Employee.WorkStartDate)  : @(Model.Employee.WorkStartDate == null ? "" : Model.Employee.WorkStartDate.Value.ToString("dd MMMM yyyy"))<br/>
        @Html.DisplayNameFor(m=>m.Employee.BirthDate)  : @(Model.Employee.BirthDate == null ? "" : Model.Employee.BirthDate.Value.ToString("dd MMMM yyyy"))<br/>
        อายุ  : @(Model.Employee.BirthDate.HasValue ? DateTime.Now.Subtract(Model.Employee.BirthDate.Value).GetYears() + " ปี" : string.Empty)  <br/>
        @Html.DisplayNameFor(m => m.Employee.Remarks) : @Model.Employee.Remarks<br/>
        ______________________________________________<br/>
        <b>Login informations</b><br/>
        Username ผู้ใช้งาน : <br/>@GimsMembership.CurrentUserName<br/>
        สิทธิ์การเข้าใช้ (ของพัสดุ) : <br/>@Html.Raw(GimsMembership.CurrentUserRoles()) <br/>
    </div> 
}